<?php
	class Model
	{
		protected $dao;
		//初始化数据库对象
		protected function initdao()
		{	
			$config=$GLOBALS['conf']['db'];
			//包含数据库类
			switch($GLOBALS['conf']['App']['dao'])
			{
				case'mysql':$dao_class='MySQLDB';break;
				case'pdo':$dao_class='PDODB';
			}

			$this->dao=$dao_class::getInstance($config);
			
		}
		public function  __construct()
		{
			$this->initdao();
		}
	}